package com.yunti.springboot.vo.req;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import com.yunti.springboot.po.ScoreRule;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SubItemReq extends PageReq {
    /**  | 表字段 id */
    @NotNull(groups = {SubItemReq.edit.class, SubItemReq.del.class},message = "id不能为空")
    private Integer id;

    /**  | 表字段 name */
    @NotBlank(groups = {SubItemReq.edit.class, SubItemReq.add.class},message = "子项名不能为空")
    private String name;

    /** 父项目id | 表字段 sub_id */
    @NotNull(groups = {SubItemReq.edit.class, SubItemReq.add.class},message = "父项目id不能为空")
    private Integer subId;

    /** 小项序号 | 表字段 item_no */
    @NotNull(groups = {SubItemReq.edit.class, SubItemReq.add.class},message = "小项序号不能为空")
    private Integer itemNo;

    /** 1.男 2.女 3.不限 | 表字段 sextype */
    @NotNull(groups = {SubItemReq.edit.class, SubItemReq.add.class},message = "性别不能为空")
    private Integer sextype;

    /**  | 表字段 min_score */
    private Long minScore;

    /**  | 表字段 max_score */
    private Long maxScore;

    /** 单位 | 表字段 unit */
    private String unit;

    @NotNull(groups = {SubItemReq.edit.class, SubItemReq.add.class},message = "成绩类型不能为空")
    private Integer scoreType;

    public @interface add{};
    public @interface edit{};
    public @interface del{};
}
